/**
 * 
 */
package RC.structs;

import java.util.ArrayList;
import java.util.Set;

import graph.Graph;

/**
 * @author NR
 *
 * TODO
 */
public abstract class Node {
	
	public Node _high = null;
	public Node _low = null;
	protected int id = 0;
	
	private static int IDC = 0;
	
	protected int dd = -1;
	//cpt for leaf, value for internal
	
	public abstract String getLabel();
	public boolean isLeaf() {
		return (_high == null && _low == null);
	}
	
	public abstract void toGraph(Graph g);
	
	
	
	public abstract ArrayList<Integer> seed( Set<String> aCutSet ) throws Exception;
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return getLabel().hashCode();
	}
	/**
	 * @return
	 */
	public abstract Set<String> getContext();
	
	public abstract Set<String> getVars();
	
	/**
	 * 
	 */
	public Node() {
		id = IDC++;
	}
}
